//
// Created by wze-zero on 2024/8/20 020.
//
#include <iostream>

using namespace std;

int main() {
    long time;
    int hour, minute, second;
    cin >> time;
    hour = time / 60 / 60;
    minute = (time - hour * 60 * 60) / 60;
    second = time % 60 % 60;
    cout << hour << " " << minute << " " << second << endl;
    return 0;
}